/*
 * @Author: your name
 * @Date: 2020-03-02 10:51:10
 * @LastEditTime: 2020-06-08 17:21:33
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \MPShop\hub\analyzeQr.js
 */
import {
    setShareId
} from '@/lib/storage';
// 解析二维码额外传参
export const analyzeQr = (option) => {
    return new Promise((resolve, reject) => {
        const shareId = option && Object.keys(option).length && option.scene && decodeURIComponent(option.scene) || '';
        // const shareId = option && Object.keys(option).length && option.scene;
        if (!shareId) {
            reject({
                resultInfo: '无分享id'
            })
        }
        resolve(setShareId(shareId));
    })
}